//
//  JYTAppointTableViewCell.m
//  JYT_IOS
//
//  Created by nxa-chengjinhui on 2017/1/6.
//  Copyright © 2017年 nxa-yuanguoxiang. All rights reserved.
//

#import "JYTAppointTableViewCell.h"

@implementation JYTAppointTableViewCell


-(void)setModel:(JYTAppointModel *)model{
    _model = model;
    
    //头像
    if ([model.Url hasPrefix:@"http"]) {
        [self.headerImg sd_setImageWithURL:[NSURL URLWithString:model.Url]];
    }else{
        self.headerImg.image = [UIImage imageNamed:@"tx_w"];
    }
    //名字
    if (![model.coach_name isKindOfClass:[NSNull class]] && model.coach_name.length>0) {
        self.nameLab.text = model.coach_name;
    }
    //性别
    if (model.sex.length>0) {
        if ([model.sex isEqualToString:@"1"]) {//男
            self.sexImg.image = [UIImage imageNamed:@"03驾校详细信息_17"];
        }else{
            self.sexImg.image = [UIImage imageNamed:@"03驾校详细信息_20"];
        }
    }
    //星星
    //训练人数
    self.trainNumber.text = [NSString stringWithFormat:@"训练人数:%@",@"2000"];
    //是否接送
    if (model.isShuttle.length>0) {
        if ([model.isShuttle isEqualToString:@"0"]) {
            self.isGet.text = @"是否接送:是";
        }else{
            self.isGet.text = @"是否接送:否";
        }
    }
    //赞数
    self.bestLab.text = @"3000";
    //描述
    self.finishLab.text = @"一人一车，性价超值。";
    //价格
    self.moneyLab.text = [NSString stringWithFormat:@"¥%@/时",@"180"];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
